<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>标签页</title>
    <link rel="stylesheet" href="bootstrap.min.css"/>
</head>
<body>
    <div class="container">
        <ul id="myTab" class="nav nav-tabs">
            <li class="active"><a href="#home" data-toggle="tab">Home</a></li>
            <li><a href="#profile" data-toggle="tab">Profile</a></li>
            <li class="dropdown">
                <a href="#" id="myTabdrop1" class="dropdown-toggle" data-toggle="dropdown">下拉菜单 <b class="caret"></b></a>
                <ul class="dropdown-menu" role="menu">
                    <li><a href="#one" tabindex="-1" data-toggle="tab">one</a></li>
                    <li><a href="#two" tabindex="-1" data-toggle="tab">two</a></li>
                </ul>
            </li>
        </ul>
        <div id="myTabContent" class="tab-content">
            <div class="tab-pane fade in active" id="home">
                <p>11Hello,你好Hello,你好Hello,你好Hello,你好</p>
            </div>
            <div class="tab-pane fade" id="profile">
                <p>22Hello,你好Hello,你好Hello,你好Hello,你好</p>
            </div>
            <div class="tab-pane fade" id="one">
                <p>one,你好Hello,你好Hello,你好Hello,你好</p>
            </div>
            <div class="tab-pane fade" id="two">
                <p>two,你好Hello,你好Hello,你好Hello,你好</p>
            </div>
        </div>
    </div>
    <script src="jquery-1.11.1.js"></script>
    <script src="bootstrap.min.js"></script>
    <script>
        $("#myTab a:last").tab("show");

        $("#myTab li:eq(0) a").tab("show");
        $('a[data-toggle="tab"]').on("show.bs.tab",function(e){
		var txt = $(this).text();
            alert(txt);
        })
    </script>
</body>
</html>